﻿//  Copyright (c) 2011 Ray Liang (http://www.dotnetage.com)
//  Licensed MIT: http://www.opensource.org/licenses/mit-license.php

using System.ComponentModel.DataAnnotations;

namespace DNA.Mvc
{
    /// <summary>
    /// Defines the data model object for OpenId.
    /// </summary>
    [Table("dna_Passports")]
    public class OpenIdentity
    {
        [Key]
        [Column("ID", Order = 1)]
        public int ID { get; set; }

        /// <summary>
        /// Gets/Sets the OpenId type.
        /// </summary>
        public int? Type { get; set; }

        [Column(TypeName="ntext")]
        public string UserData { get; set; }

        /// <summary>
        /// Gets / Sets the OpenId account
        /// </summary>
        /// <example>
        /// The openId maybe a url, e.i.: http://username.myopenid.com
        /// </example>
        public string UserId { get; set; }

        /// <summary>
        /// Gets/Sets the user name who own this OpenId.
        /// </summary>
        [StringLength(255)]
        public string UserName { get; set; }
    }
}
